﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using XLua;

public class Lesson9_CallLuaTable : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        LuaMgr.GetInstance().Init();
        LuaMgr.GetInstance().DoLuaFile("Main");
        LuaTable testClass = LuaMgr.GetInstance().Global.
            Get<LuaTable>("testClass");
        
        Debug.Log("____________________________");
        Debug.Log(testClass.Get<int>("testInt"));
        Debug.Log(testClass.Get<float>("testFloat"));
        Debug.Log(testClass.Get<LuaTable>("testInClass")
            .Get<bool>("testBool"));
        testClass.Get<LuaFunction>("testFunc2").Call(testClass);

    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
